package com.ruoyi.consumer.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consumer.mapper.CFillingStationMapper;
import com.ruoyi.consumer.domain.CFillingStation;
import com.ruoyi.consumer.service.ICFillingStationService;

/**
 * 加注站Service业务层处理
 * 
 * @author shunxin
 * @date 2023-10-23
 */
@Service
public class CFillingStationServiceImpl implements ICFillingStationService 
{
    @Autowired
    private CFillingStationMapper cFillingStationMapper;

    /**
     * 查询加注站
     * 
     * @param stationId 加注站主键
     * @return 加注站
     */
    @Override
    public CFillingStation selectCFillingStationByStationId(Integer stationId)
    {
        return cFillingStationMapper.selectCFillingStationByStationId(stationId);
    }

    /**
     * 查询加注站列表
     * 
     * @param cFillingStation 加注站
     * @return 加注站
     */
    @Override
    public List<CFillingStation> selectCFillingStationList(CFillingStation cFillingStation)
    {
        return cFillingStationMapper.selectCFillingStationList(cFillingStation);
    }

    /**
     * 新增加注站
     * 
     * @param cFillingStation 加注站
     * @return 结果
     */
    @Override
    public int insertCFillingStation(CFillingStation cFillingStation)
    {
        cFillingStation.setCreateTime(DateUtils.getNowDate());
        return cFillingStationMapper.insertCFillingStation(cFillingStation);
    }

    /**
     * 修改加注站
     * 
     * @param cFillingStation 加注站
     * @return 结果
     */
    @Override
    public int updateCFillingStation(CFillingStation cFillingStation)
    {
        cFillingStation.setUpdateTime(DateUtils.getNowDate());
        return cFillingStationMapper.updateCFillingStation(cFillingStation);
    }

    /**
     * 批量删除加注站
     * 
     * @param stationIds 需要删除的加注站主键
     * @return 结果
     */
    @Override
    public int deleteCFillingStationByStationIds(Integer[] stationIds)
    {
        return cFillingStationMapper.deleteCFillingStationByStationIds(stationIds);
    }

    /**
     * 删除加注站信息
     * 
     * @param stationId 加注站主键
     * @return 结果
     */
    @Override
    public int deleteCFillingStationByStationId(Integer stationId)
    {
        return cFillingStationMapper.deleteCFillingStationByStationId(stationId);
    }
}
